<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ page import="java.util.List" %>
<%@ page import="java.util.Set" %>
<%@ page import="com.pojo.job.pa.PAType" %>
<%@ page import="com.pojo.job.pa.PAMenu" %>
<%@page import="java.util.Iterator"%>
<%@ include file="/default.jsp"  %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
	List<PAType> lists  = (List<PAType>)request.getAttribute("patypes");
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>行政人事</title>
<link rel="stylesheet" href="/Sunlike/extjs/resources/css/ext-all.css" type="text/css"></link>
<link rel="stylesheet" href="/Sunlike/css/toolbar.css" type="text/css"></link>
<script type="text/javascript" src="/Sunlike/extjs/adapter/ext/ext-base-debug.js"></script>
<script type="text/javascript" src="/Sunlike/extjs/ext-all-debug.js"></script>
<script type="text/javascript"  src="/Sunlike/js/Setting/toolbar.js"></script>
<style type="text/css">
<!--
.style1 {color: white}
.style2 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
}
.style5 {font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; }
.style7 {font-family: Arial, Helvetica, sans-serif; font-size: 12; font-weight; }
a{text-decoration:none;color:black;};
-->
</style>
</head>
<body>
<div id='toolbarspan'></div>

<table width="100%" cellspacing="0" cellpadding="0" rules="GROUPS">
<tbody>
<tr>
	<td colspan="2">
		<table width="100%" border="0" cellpadding="4" cellspacing="0">
	      <tbody>
	      <tr bgcolor="#ECE8D8">
	        <td width="12%">&nbsp;&nbsp;&nbsp;&nbsp;<span><font size="2">主分類</font></span></td>
	        <td width="20%">&nbsp;&nbsp;&nbsp;&nbsp;<span><font size="2">工作類別</font></span></td>
	        <td align="center"><span><font size="2" color="blue">一般表單</font></span></td>
	      </tr>
		  </tbody>
		</table>
	</td>
</tr>
</tbody>

<tbody>
<tr>
	<td width="12%" valign="top" bgcolor="#ECE8D8"><span> &nbsp;	<font color="blue" style="font-size:16px;"><b>行政人事</b> </font></span></td>
    <td>
			<table width="100%" cellpadding="10" cellspacing="0" rules="GROUPS">
			<%
				for(PAType patype : lists){
						Set<PAMenu> pamenus = patype.getPamenus();
			%>
		    <tbody>
		      <tr>
		        <td width="20%" valign="top" bgcolor="#ECE8D8"><span><img src="/Sunlike/images/small_icon.bmp">&nbsp;<font  style="font-size:16px;"><%= patype.getNAME() %></font></span></td>
		        <td bgcolor="white">
					<table width="100%" border="0" cellspacing="0" cellpadding="2">
			      	<tbody>
			      	<tr>	
			   		<%
			      	 Iterator<PAMenu>  iterator = pamenus.iterator();
			      	 int i = 0;
			      	 while(iterator.hasNext()){
			      	 	PAMenu pamenu = iterator.next();
			      		if ( i  != 0 &&  i  % 3 == 0) out.println("</tr>"); 
			      	%>
		             <td width="33%" valign="top" height="35"><span>			
		   	    	  		&nbsp;&nbsp;<a href="jobMenuAction.initSettingData.action?menuId=<%= pamenu.getID() %>"><font  style="font-size:16px;font-family:MSYHBD;"><%= pamenu.getNAME() %></font></a>
		              </span></td>
		            <%
		            	i++;
			      		}
			      	int remaind = i % 3;
			        if (remaind > 0) { for (int k = remaind;  k < 3; k++) { out.println("<td width='33%'>&nbsp;</td>"); }  }
		            %>
		             </tr>
		   		  </tbody>
		   		  </table>         
		      </td>
		     </tr>
		</tbody> 
		<%
				}
		%>		
</table>		

</body>
</html>